public class ZhaiZhiJie02
{
    public static void main(String[] args) {
        A2 a = new B2();
        a.fun2();
    }
}

class A2
{
    public void fun1()
    {
        System.out.println("A->fun1()");
    }
    public void fun2()
    {
        System.out.println("A->fun2()");
    }
}

class B2 extends A2
{
    public void fun1()
    {
        System.out.println("B2->fun1()");
    }
    public void fun3()
    {
        System.out.println("B2->fun3()");
    }
}